package main

import (
	"fmt"
	"github.com/go-telegram-bot-api/telegram-bot-api"
	"log"
)

var (
	TOKEN         = "1179767475:AAG_aeMj6ABj8S3T4-H2F3gM3piF0_ZuX0w"
	CHAT_ID int64 = -464872782
)

func main() {
	content := "该提交日报了"
	RobbotSendMsg(TOKEN, content, CHAT_ID)
}

func RobbotSendMsg(token, sendContent string, chatId int64) {
	bot, err := tgbotapi.NewBotAPI(token)
	if err != nil {
		log.Panic(err)
	}
	msg := tgbotapi.NewMessage(chatId, sendContent)
	msg1, err := bot.Send(msg)
	if err != nil {
		log.Println("发送失败", err.Error())
	} else {
		fmt.Println("发送的消息id为：", msg1.MessageID)
	}

}
